<template>
    <div>
        {{ selectedKeys }}
        <VTable
            :columns="columns"
            :http="getTableData"
            :params="params"
            :selectedKeys.sync="selectedKeys"
            :is-reload.sync="isReload"
            :rowKey="(record) => record.id"
            :scroll="{ x: true, y: true }"
        >
        <template #buttonsExtra>
            <AButton>新增</AButton>
            <ADeleteButton :selected-keys="selectedKeys">批量删除</ADeleteButton>
        </template>
        <template #action="{ row }">
            <VA @click="edit(row)">编辑</VA>
            <VA type="danger">删除</VA>
        </template>
        </VTable>
    </div>
</template>

<script>
import { getTableData } from "@/api/common";
import { columns, columnss, data } from "./config";
export default {
    data() {
        return {
            columns,
            params: {
                // age: 11,
            },
            selectedKeys: [],
            isReload: false,
            columnss,
            data
        };
    },
    mounted() {},
    methods: {
        getTableData,
        edit(row) {
            console.log(row, 'row');
        }
    },
};
</script>

<style></style>
